// pages/seckillPaymentResult/seckillPaymentResult.js
const app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    statusBarHeight: app.globalData.statusBarHeight,
    fullHeight: app.globalData.fullcontain,

    demolist:{
      "payed": "342.00",
      "orderView": "3",
      "actlist": [
        {
          "id": 1,
          "sign": "DB97C2D1C4B083E163F7246C33E7F40DEF13F4724DA6A24946B6CD5286D6E17141090449",
          "appointStoreNames": "深大",
          "activityNo": "MX0901",
          "imageUrl": "../../images/picture4.png",
          "goodsPrice": "89.11",
          "vipPrice": "2999.00",
          "newPrice": "121.23",
          "name": "日本 Dance丹盛激光美白仪，深度美白，去皱，紧213日本 Dance丹盛激光美白仪，深度美白，去皱，紧122",
          "limitPeople": null,
          "goodsType": 1,
          "goodsTypeValue": "产品"
        },
        {
          "id": 2,
          "sign": "FAA0B59DE8CDFD6B63F7246C33E7F40DEF13F4724DA6A24946B6CD5286D6E17182a43f16",
          "activityNo": "MX0901",
          "imageUrl": "../../images/picture4.png",
          "goodsPrice": "89.11",
          "vipPrice": "2999.00",
          "newPrice": "121.23",
          "name": "日本 Dance丹盛激光美白仪，深度美白，去皱，紧213日本 Dance丹盛激光美白仪，深度美白，去皱，紧122",
          "limitPeople": null,
          "goodsType": 2,
          "goodsTypeValue": "产品"
        }
      ]
    },
  },
  pageto: function(e){
    var url = e.currentTarget.dataset.url,
        data = e.currentTarget.dataset.datobj;
    app.goto(url,data);
  },
  closebackfn: function(e){
    var that = this;
    console.log("shareback",e.detail); //子组件返回参数
    that.setData({
      shareflag: false,
      navmess: {
        navtitle: "支付结果",
        backhide: 0,
        topheight: 1,
      },
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
      var that = this;
      if(JSON.parse(options.mesObj) == 2){
        // 拼团已支付邀请弹窗
        that.setData({
          navmess: {
            navtitle: "支付结果",
            backhide: 1,
            topheight: 1,
          },
          toshareobj: {
            "lacknum": 2,
          },
          shareflag: true,
        })
      }else{
        that.setData({
          navmess: {
            navtitle: "支付结果",
            backhide: 0,
            topheight: 1,
          },
        })
      }
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})